package com.ruoyi.manage.mapper;

import java.util.List;
import com.ruoyi.manage.domain.CrRecruitment;
import org.apache.ibatis.annotations.Param;

/**
 * 社团招聘信息Mapper接口
 */
public interface CrRecruitmentMapper
{
    /**
     * 查询社团招聘信息
     */
    public CrRecruitment selectCrRecruitmentByRecruitmentId(Long recruitmentId);

    /**
     * 查询社团招聘信息列表
     */
    public List<CrRecruitment> selectCrRecruitmentList(CrRecruitment crRecruitment);

    /**
     * 查询活跃的招聘信息（学生端使用）
     */
    public List<CrRecruitment> selectActiveRecruitmentList(CrRecruitment crRecruitment);

    /**
     * 查询推荐招聘信息
     */
    public List<CrRecruitment> selectFeaturedRecruitmentList(@Param("limit") int limit);

    /**
     * 根据社团ID查询招聘列表
     */
    public List<CrRecruitment> selectRecruitmentListByClubId(Long clubId);

    /**
     * 根据社团类型查询招聘列表
     */
    public List<CrRecruitment> selectRecruitmentListByClubType(String clubType);

    /**
     * 搜索招聘信息（支持关键字搜索）
     */
    public List<CrRecruitment> searchRecruitmentList(@Param("keyword") String keyword, @Param("clubType") String clubType);

    /**
     * 查询学生匹配的招聘信息（智能推荐）
     */
    public List<CrRecruitment> selectMatchedRecruitmentList(@Param("userId") Long userId, @Param("limit") int limit);

    /**
     * 统计招聘信息
     */
    public int countRecruitmentByClub(@Param("clubId") Long clubId);

    /**
     * 更新浏览次数
     */
    public int updateViewCount(@Param("recruitmentId") Long recruitmentId);

    /**
     * 更新申请数量
     */
    public int updateAppliedCount(@Param("recruitmentId") Long recruitmentId, @Param("count") int count);

    /**
     * 新增社团招聘信息
     */
    public int insertCrRecruitment(CrRecruitment crRecruitment);

    /**
     * 修改社团招聘信息
     */
    public int updateCrRecruitment(CrRecruitment crRecruitment);

    /**
     * 删除社团招聘信息
     */
    public int deleteCrRecruitmentByRecruitmentId(Long recruitmentId);

    /**
     * 批量删除社团招聘信息
     */
    public int deleteCrRecruitmentByRecruitmentIds(Long[] recruitmentIds);

    /**
     * 批量更新招聘状态
     */
    public int batchUpdateRecruitmentStatus(@Param("recruitmentIds") Long[] recruitmentIds, @Param("status") String status);
}